Skip to content

fix(toolkit): disallow none combined with other prompts in oidcPromptsGuard (#9565) - #9596

Open
Tyagiquamar wants to merge 4 commits into
logto-io:masterfrom
Tyagiquamar:fix/oidc-prompt-none-validation
Open

Tyagiquamar wants to merge 4 commits into
logto-io:masterfrom
Tyagiquamar:fix/oidc-prompt-none-validation

Conversation

@Tyagiquamar

Copy link
Copy Markdown

Fixes #9565

Description

oidcPromptsGuard allowed
one when combined with other prompt values (such as select_account or consent). According to OIDC Core 1.0 §3.1.2.1,
one cannot be combined with any other prompt value.

This PR adds a .refine() validation check to oidcPromptsGuard in packages/toolkit/connector-kit/src/types/social.ts to reject
one when combined with other prompts, and adds unit tests.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The published package needs a patch changeset, and one test name is inaccurate.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds OIDC validation preventing none from being combined with other prompts.

Changes:

  • Adds mutually exclusive prompt validation.
  • Adds unit tests for valid and invalid combinations.
File summaries
File Description
social.ts Adds OIDC prompt validation.
social.test.ts Tests prompt validation behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/toolkit/connector-kit/src/types/social.test.ts Outdated
Comment thread packages/toolkit/connector-kit/src/types/social.ts

@wangsijie wangsijie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at copilot's comments

Copilot AI review requested due to automatic review settings September 14, 2026 06:56
@github-actions github-actions Bot added size/s and removed size/s labels Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changeset should describe user-facing behavior rather than the internal guard implementation.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .changeset/oidc-prompt-none-validation.md Outdated
Copilot AI review requested due to automatic review settings September 14, 2026 07:04
@github-actions github-actions Bot added size/s and removed size/s labels Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The validation matches the OIDC requirement and is supported by focused tests and an appropriate changeset.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 15, 2026 06:14
@wangsijie
wangsijie force-pushed the fix/oidc-prompt-none-validation branch from d8d03f6 to 3d5655b Compare September 15, 2026 06:14
@github-actions github-actions Bot added size/s and removed size/s labels Sep 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused validation correctly addresses the reported issue and is adequately tested.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@wangsijie wangsijie changed the title fix(connector-kit): disallow none combined with other prompts in oidcPromptsGuard (#9565) fix(toolkit): disallow none combined with other prompts in oidcPromptsGuard (#9565) Sep 15, 2026
@github-actions github-actions Bot added size/s and removed size/s labels Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

bug: oidcPromptsGuard allows none combined with other prompts, breaking Google sign-in

3 participants